﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="IssuesEdit.aspx.cs" Inherits="CustomerService.Issues.IssuesEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
        <script type="text/javascript">
            var i = 1;
            function addFile() {
                if (i < 8) {
                    var str = '<BR> <input type="file" name="File" runat="server" style="width: 300px"/>'
                    document.getElementById('MyFile').insertAdjacentHTML("beforeEnd", str);
                }
                else {
                    alert("您一次最多只能上传8个附件！");
                }
                i++;
            }
    </script>

        <style type="text/css">
            .style1
            {
                width: 87px;
            }
            .style2
            {
                width: 141px;
            }
            .style3
            {
                width: 100px;
            }
            .style5
            {
                width: 81px;
            }
            .style6
            {
                width: 192px;
            }
        </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table class="issue">
        <tr>
            <td class="style1">
                标题
            </td>
            <td colspan="5">
                <asp:TextBox ID="txtIssueTitle" runat="server" Width="508px" MaxLength="500"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style1">
                问题编号
            </td>
            <td class="style2">
                <asp:Label ID="labId" runat="server" Text="Label"></asp:Label>
            </td>
            <td class="style3">
                GSID
            </td>
            <td colspan="3">
                <asp:TextBox ID="txtGSID" runat="server" Width="473px" MaxLength="128"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style1">
                问题等级
            </td>
            <td class="style2">
                <asp:DropDownList ID="dropIssueLevel" runat="server" DataSourceID="SqlDataSource1"
                    DataTextField="IssueLevelID" DataValueField="IssueLevelID" 
                    ondatabound="dropIssueLevel_DataBound">
                </asp:DropDownList>
            </td>
            <td class="style3">
                问题分类
            </td>
            <td class="style6">
                <asp:DropDownList ID="dropIssueCategory" runat="server" DataSourceID="SqlDataSource3"
                    DataTextField="IssueCategoryName" DataValueField="IssueCategoryID" 
                    ondatabound="dropIssueCategory_DataBound">
                </asp:DropDownList>
            </td>
            <td class="style5">
                问题来源
            </td>
            <td>
                <asp:DropDownList ID="dropIssueSource" runat="server" DataSourceID="SqlDataSource2"
                    DataTextField="IssueSourceName" DataValueField="IssueSourceID" 
                    ondatabound="dropIssueSource_DataBound">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="style1">
                客户端版本
            </td>
            <td class="style2">
                <asp:DropDownList ID="dropClientVersion" runat="server" DataSourceID="SqlDataSource4"
                    DataTextField="ClientVersionValue" DataValueField="ClientVersionID" 
                    ondatabound="dropClientVersion_DataBound">
                </asp:DropDownList>
            </td>
            <td class="style3">
                客户QQ
            </td>
            <td class="style6">
                <asp:TextBox ID="txtCustomersQQ" runat="server" MaxLength="20"></asp:TextBox>
            </td>
            <td class="style5">
                客户电话
            </td>
            <td>
                <asp:TextBox ID="txtCustomersMobile" runat="server" MaxLength="50"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style1">
                客户姓名
            </td>
            <td class="style2">
                <asp:TextBox ID="txtUserName" runat="server" MaxLength="50"></asp:TextBox>
            </td>
            <td class="style3">
                云游戏帐号
            </td>
            <td class="style6">
                <asp:TextBox ID="txtUserAccounts" runat="server" MaxLength="100"></asp:TextBox>
            </td>
            <td class="style5">
                用户带宽
            </td>
            <td>
                <asp:DropDownList ID="dropOperators" runat="server" DataSourceID="SqlDataSource10"
                    DataTextField="OperatorsName" DataValueField="OperatorsID" 
                    ondatabound="dropOperators_DataBound">
                </asp:DropDownList>
                <asp:DropDownList ID="dropBandWidth" runat="server" DataSourceID="SqlDataSource8"
                    DataTextField="BandWidthValue" DataValueField="BandWidthID" 
                    ondatabound="dropBandWidth_DataBound">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="style1">
                服务区
            </td>
            <td class="style2">
                <asp:DropDownList ID="dropServiceArea" runat="server" DataSourceID="SqlDataSource5"
                    DataTextField="ServiceAreaName" DataValueField="ServiceAreaID" 
                    ondatabound="dropServiceArea_DataBound">
                </asp:DropDownList>
            </td>
            <td class="style3">
                地区
            </td>
            <td class="style6">
                <asp:TextBox ID="txtRegion" runat="server" MaxLength="128"></asp:TextBox>
            </td>
            <td class="style5">
                负责人
            </td>
            <td>
                <asp:DropDownList ID="dropPrincipal" runat="server" DataSourceID="SqlDataSource7"
                    DataTextField="EmployeeName" DataValueField="EmployeeID" 
                    ondatabound="dropPrincipal_DataBound">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="style1">
                操作系统
            </td>
            <td class="style2">
                <asp:DropDownList ID="dropSystemEnvironment" runat="server" DataSourceID="SqlDataSource9"
                    DataTextField="SystemEnvironmentValue" 
                    DataValueField="SystemEnvironmentID" 
                    ondatabound="dropSystemEnvironment_DataBound">
                </asp:DropDownList>
            </td>
            <td class="style3">
                实测码率
            </td>
            <td class="style6">
                <asp:TextBox ID="txtDecodingRate" runat="server" MaxLength="128"></asp:TextBox>
            </td>
            <td class="style5">
                是否畅通
            </td>
            <td>
                <asp:CheckBox ID="cbIsUnblocked" runat="server" Checked="true" Text="畅通" />
            </td>
        </tr>
        <tr>
            <td class="style1">
                状态
            </td>
            <td class="style2">
                <asp:Label ID="labStatus" runat="server" Text="Label"></asp:Label>
            </td>
            <td class="style3">
                创建人
            </td>
            <td class="style6">
                <asp:Label ID="labCreateUser" runat="server" Text="Label"></asp:Label>
            </td>
            <td class="style5">
                报障时间
            </td>
            <td>
                <asp:Label ID="labExceptionTime" runat="server" Text="Label"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="6">
                备注
            </td>
        </tr>
        <tr>
            <td colspan="6">
                <asp:TextBox ID="txtMark" runat="server" CssClass="remark" Rows="5" 
                    TextMode="MultiLine" MaxLength="4000"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="6">
                <asp:Label ID="labAccessories" runat="server" Text=""></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                附件(最多上传8个)：
            </td>
            <td colspan="4">
                <p id="MyFile">
                    <input onclick="addFile()" type="button" value="增加附件(Add)"><br />
                </p>
                <%--  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:FileUpload ID="fUpload" runat="server" />
                        <asp:Button ID="Button2" runat="server" Text="添加" onclick="Button2_Click" />
                        <div>
                            <asp:Label ID="Label1" runat="server" Text="已上传附件："></asp:Label>
                        </div>                     
                    </ContentTemplate>
                </asp:UpdatePanel>
                --%>
            </td>
        </tr>
    </table>
    <div>
        
        <asp:Label runat="server" ID="LabIssueID" Visible="False" ></asp:Label>
    </div>
    <div style="text-align: center;">
        <asp:Button ID="Button1" runat="server" Text="修改问题" onclick="Button1_Click" />
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CustomerService %>"
        SelectCommand="SELECT * FROM [IssueLevel]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:CustomerService %>"
        SelectCommand="SELECT * FROM [IssueSource]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:CustomerService %>"
        SelectCommand="GetIssuecategories" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:CustomerService %>"
        SelectCommand="SELECT * FROM [ClientVersion]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource8" runat="server" ConnectionString="<%$ ConnectionStrings:CustomerService %>"
        SelectCommand="SELECT * FROM [BandWidth]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:CustomerService %>"
        SelectCommand="SELECT * FROM [ServiceArea]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource6" runat="server" ConnectionString="<%$ ConnectionStrings:CustomerService %>"
        SelectCommand="SELECT * FROM [Region]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource9" runat="server" ConnectionString="<%$ ConnectionStrings:CustomerService %>"
        SelectCommand="SELECT * FROM [SystemEnvironment]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource7" runat="server" ConnectionString="<%$ ConnectionStrings:CustomerService %>"
        SelectCommand="SELECT * FROM [Employees] WHERE ([IsPrincipal] = @IsPrincipal)">
        <SelectParameters>
            <asp:Parameter DefaultValue="true" Name="IsPrincipal" Type="Boolean" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource10" runat="server" ConnectionString="<%$ ConnectionStrings:CustomerService %>"
        SelectCommand="SELECT * FROM [Operators]"></asp:SqlDataSource>
</asp:Content>
